<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./MainTemplate.xhtml">

            <ui:define name="top">
                
            </ui:define>

            <ui:define name="left">
                
            </ui:define>

            <ui:define name="right">
                
            </ui:define>

            <ui:define name="content">
                <f:view>
                     <p:panel header="Crear/Editar Vehiculos" footer="Formulario Validado">
                    <h:form>
                        <p:growl life="3000"/>
                        <h:panelGrid columns="2">
                            <h:outputLabel value="Placas:" for="placas" />
                            <p:inputMask id="placas" value="#{vehiculosBean.cars.placas}" title="Placas" validatorMessage="Letras Mayusculas - Números" mask="a*a-99-99">
                            </p:inputMask>
                            
                            <h:outputLabel value="Color:" for="color" />
                            <p:inputText id="color" value="#{vehiculosBean.cars.color}" title="Color" required="true" validatorMessage="Letra Mayuscula y Minusculas">
                                <f:validateRegex pattern="[A-Z]+[a-z]+"/>
                            </p:inputText>
                            <p:commandButton action="VehiculosVista" value="Cancelar" immediate="true" ajax="false"/>
                            <p:commandButton value="Aceptar" action="VehiculosConfirmar" ajax="false"/>
                        </h:panelGrid>
                    </h:form>
                     </p:panel>
                </f:view>

            </ui:define>

        </ui:composition>

    </body>
</html>
